<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/css/shopping.css">
    <link rel="stylesheet" href="/libs/bootstrap-3.3.7/css/bootstrap.min.css">
    <title>购物车</title>
</head>

<body>
    <header></header>
    <div class="center">
        <div class="mcenter">
            <table>
                <thead>
                    <tr>
                        <th><input type="checkbox" id="totalchecked">全选</th>
                        <th>单价</th>
                        <th>数量</th>
                        <th>小计</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id ="tbody_shop"></tbody>
                <script type="text/html" id="script_shop">
                    {{each resp i}}
                    <tr index="{{i.id}}">
                        <td><input class="td_input" type="checkbox" {{i.ischecked ? 'checked' : ''}}>{{i.title}}
                            <img src="{{i.imgs}}" alt="">
                        </td>
                        <td>{{i.price}}</td>
                        <td><span class="less_num glyphicon glyphicon-minus"></span> <b>{{i.num}}</b> <span class="more_num glyphicon glyphicon-plus"></span></td>
                        <td>{{i.num*i.price}}</td>
                        <td id="deletetd">删除</td>
                    </tr>
                    {{/each}}
                </script>
                <tfoot>
                    <tr>
                        <td colspan="5" id="tfootid" class="tfootcol">清空购物车</td>
                    </tr>
                </tfoot>
            </table>

            <aside>
                <p>我的购物车</p>
                <p>商品数量:<span id="num">0</span></p>
                <p>商品金额:<span id="sum">0</span></p>
                <div id="payfor">去结算</div>
            </aside>


        </div>
    </div>
    <footer></footer>
</body>
<script src="/libs/require/require.min.js" data-main="/js/shopping"></script>

</html>